
// apply the transform
var fragment = _helper.applyTransform("start", null);
var current = fragment.firstChild;
while (current) {
   document.body.appendChild(current);
   current = current.nextSibling;
}

// update the title
var heads = this.window.document.documentElement.getElementsByTagName("head");
if (heads.length>0) {
   var titles = this.window.document.documentElement.getElementsByTagName("title");
   if (titles.length>0) {
      var title = _helper.document.documentElement.firstChild;
      while (title) {
         if (title.nodeType==Node.ELEMENT_NODE && title.localName=="title") {
            this.window.document.title = title.textContent;
            break;
         }
         title = title.nextSibling;
      }
   }
}

function sayHello() {
   alert("Hello from "+_helper.document.documentElement.localName);
}
